﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NLite.UI
{
    /// <summary>
    /// MVP 模式中的Presenter接口
    /// </summary>
    public interface IPresenter : ICompositeDisposable, IInitializable
    {
        /// <summary>
        /// 订阅消息总线上的消息
        /// </summary>
        /// <returns></returns>
        IEnumerator<IDisposable> Subscribe();

        /// <summary>
        /// View 
        /// </summary>
        IView View { get; }
    }

    /// <summary>
    /// MVP 模式中的Presenter泛型接口
    /// </summary>
    public interface IPresenter<TView> : IPresenter where TView : IView
    {
        /// <summary>
        /// 泛型视图
        /// </summary>
        new TView View { get; }
    }
}
